# Configuration file for get_java Java package downloader and builder
#160820 Update Oracle version and package sed scripts and Java download script
#180424 Update oracle VRSN & DNLD sed scripts for separate architecture versions and file name formats; update DNLD sed script BundleId pattern;.

GET_JAVA_VERSION="1.1"
# URLs and SED scripts for locating and downloading Java archove packages:
ORACLE_URL='http://www.oracle.com/technetwork/java/javase/downloads/index.html'
ORACLE_VRSN_SED_SCRIPT="/\">Java SE .*[0-9.u]\+[</]/ s%.* \([0-9$(echo $JAVA_ARCH | grep -q 'x64' && echo -n . || echo -n u)]\+\)<.*%\1%p"
ORACLE_PKG_SED_SCRIPT="s%.*href=\"\(/technetwork/java/javase/downloads/${JAVA_PACKAGE}[0-9]\\+-downloads-[0-9]\+\.html\)\".*%http://www\\.oracle\\.com\1%p"
ORACLE_DNLD_SED_SCRIPT="/^downloads/ s%.*\(http://download\.oracle\.com/otn-pub/java/jdk/.*/.*/$JAVA_PACKAGE-.*[_-]linux-$(echo $JAVA_ARCH | grep -q 'x64' && echo -n x64_bin || echo -n i586)\.tar\.gz\).*%\1%p"
JAVA_URL='http://www.java.com/en/download/manual.jsp'
JAVA_VRSN_SED_SCRIPT="s/.*Version \([0-9]\+\) Update \([0-9]\+\).*/\1u\2/p"
JAVA_DNLD_SED_SCRIPT="/Linux$(echo -n $JAVA_ARCH | grep 'x64' | sed 's/x64/ &/')\"/ s%.*\(http://javadl\\.oracle\\.com/webapps/download/AutoDL?BundleId=[0-9_a-f]\+\).*%\1%p"

# Estimates of space to allow for packages and temporary expansion of them:
MAX_JRE_EXPANDED_MB=200 #to expand java jre
MAX_JDK_EXPANDED_MB=400 #to expand java jdk
MAX_JRE_PKG_MB=70 #to save/build jre package
MAX_JDK_PKG_MB=150 #to save/build jdk package
LEAVE_SPACE_MB=100 #to leave space for other uses
